import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';

createApp(App).use(store).use(router).use(Antd).mount('#app')

console.log('环境',process.env.NODE_ENV);
console.log('服务端',process.env.VUE_APP_SERVER);
axios.defaults.baseURL = process.env.VUE_APP_SERVER;



/*
* 使用axios拦截器打印请求和响应的数据
* */
axios.interceptors.request.use(function (config:any){
    console.log('请求参数：',config);
    
    return config;
},error => {
    return Promise.reject(error);
});

axios.interceptors.response.use(function (response){
    console.log('返回结果：',response);
    return response;
},error => {
    console.log('返回错误：',error);
    return Promise.reject(error);
});